import request from '@/axios'

function formatRequestUri(name) {
  return 'form/userForm/' + name
}

export function Get(data) {
  return request.post({
    url: formatRequestUri('Get'),
    data
  })
}
export function Calculate(formId, data) {
  return request.post({
    url: formatRequestUri('Calculate'),
    data: {
      Id: formId,
      Value: data
    }
  })
}

export function CalculateState(formId, data) {
  return request.post({
    url: formatRequestUri('CalculateState'),
    data: {
      Id: formId,
      Value: data
    }
  })
}
